package com.svse.designPattern.behaviour.chainofresponsibility.impl;

import com.svse.designPattern.behaviour.chainofresponsibility.service.Leader;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/8/8 10:53
 */
public class ClassAdviser extends Leader {
    @Override
    public void vacate(int days) {
        if(days <=3){
            System.out.println("小于三天 班主任批准假期");
        }else{
            System.out.println("大于三天 班主任权利不足 需要更大级别领导批准");
            if(getNextLeader()!= null){
                getNextLeader().vacate(days);
            }else{
                System.out.println("没有批准假期");
            }
        }
    }
}
